/*    */ package com.zimbra.cs.datasource;
/*    */ 
/*    */ import com.google.common.annotations.VisibleForTesting;
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.account.DataSource;
/*    */ import com.zimbra.cs.db.DbDataSource;
/*    */ import com.zimbra.cs.db.DbDataSource.DataSourceItem;
/*    */ import java.util.Collection;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class DataSourceDbMapping
/*    */ {
/*    */   private static DataSourceDbMapping instance;
/*    */   
/*    */   public static synchronized DataSourceDbMapping getInstance()
/*    */   {
/* 32 */     if (instance == null) {
/* 33 */       instance = new DataSourceDbMapping();
/*    */     }
/* 35 */     return instance;
/*    */   }
/*    */   
/*    */   @VisibleForTesting
/*    */   public static synchronized void setInstance(DataSourceDbMapping mapping) {
/* 40 */     instance = mapping;
/*    */   }
/*    */   
/*    */   public void updateMapping(DataSource ds, DbDataSource.DataSourceItem item) throws ServiceException {
/* 44 */     DbDataSource.updateMapping(ds, item);
/*    */   }
/*    */   
/*    */   public void addMapping(DataSource ds, DbDataSource.DataSourceItem item) throws ServiceException {
/* 48 */     DbDataSource.addMapping(ds, item);
/*    */   }
/*    */   
/*    */   public void deleteMapping(DataSource ds, int itemId) throws ServiceException {
/* 52 */     DbDataSource.deleteMapping(ds, itemId);
/*    */   }
/*    */   
/*    */   public DbDataSource.DataSourceItem getReverseMapping(DataSource ds, String remoteId) throws ServiceException {
/* 56 */     return DbDataSource.getReverseMapping(ds, remoteId);
/*    */   }
/*    */   
/*    */   public DbDataSource.DataSourceItem getMapping(DataSource ds, int itemId) throws ServiceException {
/* 60 */     return DbDataSource.getMapping(ds, itemId);
/*    */   }
/*    */   
/*    */   public Collection<DbDataSource.DataSourceItem> getAllMappingsInFolder(DataSource ds, int folderId) throws ServiceException {
/* 64 */     return DbDataSource.getAllMappingsInFolder(ds, folderId);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/datasource/DataSourceDbMapping.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */